@* Generator: Template TypeVisibility: Internal *@
@using System
@using System.Globalization
@using Elmah
@inherits WebTemplateBase
@functions
{
    public string Title { get; set; }
    public object Footnote { get; set; }
    public IEnumerable<SpeedBar.FormattedItem> SpeedBarItems { get; set; }
}
@{
    var basePageName = Request.ServerVariables["URL"];
    
    var now = DateTime.Now;
    var tz = TimeZone.CurrentTimeZone;
    
    var about = PoweredBy.GetAbout(Context.Cache, (version, fileVersion, product, copyright) => new
    {
        Version   = version != null
                  ? version.ToString()
                  : fileVersion != null 
                  ? fileVersion.ToString() 
                  : "?.?.?.?",
        Product   = Mask.EmptyString(product, "(product)"),
        Copyright = copyright,
    });

    var speedBarItems = (SpeedBarItems ?? Enumerable.Empty<SpeedBar.FormattedItem>()).ToArray();
}
<!DOCTYPE html>
<html>
    <head>
        @if (!string.IsNullOrEmpty(Title))
        {
            <title>@Title</title>
        }
        @* TODO Move HTML5 shim into a resource *@
        <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
        <!--[if lt IE 9]>
          <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        <link rel="stylesheet" type="text/css" href="@basePageName/stylesheet?h=@Uri.EscapeDataString(StyleSheetHelper.StyleSheetHash)" />
        <style type="text/css">
          body {
            padding-top: 60px;
          }
        </style>
    </head>
    <body>
        @if (speedBarItems.Any())
        {
            <div id="topnavbar" class="navbar navbar-fixed-top">
                <div class="navbar-inner">
                    <div class="container">
                        <a class="brand" href="http://elmah.googlecode.com/">ELMAH</a>
                        @SpeedBar.Render(Request.Browser, speedBarItems)
                    </div>
                </div>
            </div>
        }
        <div class="container-fluid">
            
            @RenderBody()
            
            <footer id="Footer">
                <span>Powered by <a href="http://elmah.googlecode.com/">@about.Product</a>, 
                    version @about.Version.
                    @about.Copyright 
                    Licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>. 
                </span>
                Server date is @now.ToString("D", CultureInfo.InvariantCulture). 
                Server time is @now.ToString("T", CultureInfo.InvariantCulture). 
                All dates and times displayed are in the 
                @(tz.IsDaylightSavingTime(now) ? tz.DaylightName : tz.StandardName) zone. 
                @Footnote
            </footer>
        </div>
    </body>
</html>
